using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeoAnalyticsServerTools._ManageData
{
    /// <summary>
    /// <para>Copy To Data Store</para>
    /// <para>Copies features from the input to a new feature service in your portal.</para>
    /// <para>将输入中的要素复制到门户中的新要素服务。</para>
    /// </summary>    
    [DisplayName("Copy To Data Store")]
    public class CopyToDataStore : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CopyToDataStore()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_layer">
        /// <para>Input Layer</para>
        /// <para><xdoc>
        ///   <para>The feature to be copied.</para>
        ///   <para>When running GeoAnalytics Server tools, the analysis is completed on the GeoAnalytics Server. For optimal performance, make data available to the GeoAnalytics Server through feature layers hosted on your ArcGIS Enterprise portal or through big data file shares. Data that is not local to your GeoAnalytics Server will be moved to your GeoAnalytics Server before analysis begins. This means that it will take longer to run a tool, and in some cases, moving the data from ArcGIS Pro to your GeoAnalytics Server may fail. The threshold for failure depends on your network speeds, as well as the size and complexity of the data. Therefore, it is recommended that you always share your data or create a big data file share.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要复制的功能。</para>
        ///   <para>运行 GeoAnalytics Server 工具时，将在 GeoAnalytics Server 上完成分析。为获得最佳性能，请通过 ArcGIS Enterprise 门户上托管的要素图层或大数据文件共享向 GeoAnalytics Server 提供数据。在分析开始之前，GeoAnalytics Server 的非本地数据将移动到 GeoAnalytics Server。这意味着运行工具需要更长的时间，并且在某些情况下，将数据从 ArcGIS Pro 移动到 GeoAnalytics Server 可能会失败。故障阈值取决于网络速度以及数据的大小和复杂性。因此，建议您始终共享数据或创建大数据文件共享。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_output_name">
        /// <para>Output Name</para>
        /// <para>Name of output feature service.</para>
        /// <para>输出要素服务的名称。</para>
        /// </param>
        public CopyToDataStore(object _input_layer, object _output_name)
        {
            this._input_layer = _input_layer;
            this._output_name = _output_name;
        }
        public override string ToolboxName => "GeoAnalytics Server Tools";

        public override string ToolName => "Copy To Data Store";

        public override string CallName => "geoanalytics.CopyToDataStore";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_input_layer, _output_name, _data_store.GetGPValue(), _output];

        /// <summary>
        /// <para>Input Layer</para>
        /// <para><xdoc>
        ///   <para>The feature to be copied.</para>
        ///   <para>When running GeoAnalytics Server tools, the analysis is completed on the GeoAnalytics Server. For optimal performance, make data available to the GeoAnalytics Server through feature layers hosted on your ArcGIS Enterprise portal or through big data file shares. Data that is not local to your GeoAnalytics Server will be moved to your GeoAnalytics Server before analysis begins. This means that it will take longer to run a tool, and in some cases, moving the data from ArcGIS Pro to your GeoAnalytics Server may fail. The threshold for failure depends on your network speeds, as well as the size and complexity of the data. Therefore, it is recommended that you always share your data or create a big data file share.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>要复制的功能。</para>
        ///   <para>运行 GeoAnalytics Server 工具时，将在 GeoAnalytics Server 上完成分析。为获得最佳性能，请通过 ArcGIS Enterprise 门户上托管的要素图层或大数据文件共享向 GeoAnalytics Server 提供数据。在分析开始之前，GeoAnalytics Server 的非本地数据将移动到 GeoAnalytics Server。这意味着运行工具需要更长的时间，并且在某些情况下，将数据从 ArcGIS Pro 移动到 GeoAnalytics Server 可能会失败。故障阈值取决于网络速度以及数据的大小和复杂性。因此，建议您始终共享数据或创建大数据文件共享。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_layer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>Name of output feature service.</para>
        /// <para>输出要素服务的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_name { get; set; }


        /// <summary>
        /// <para>Data Store</para>
        /// <para><xdoc>
        ///   <para>The ArcGIS Data Store to which the output will be saved. The default is Spatiotemporal big data store. All results stored to the Spatiotemporal big data store will be stored in WGS84. Results stored in a Relational data store will maintain their coordinate system.</para>
        ///   <bulletList>
        ///     <bullet_item>Spatiotemporal big data store—Output will be stored in your spatiotemporal big data store. This is the default.</bullet_item><para/>
        ///     <bullet_item>Relational data store—Output will be stored in your relational data store.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将保存输出的 ArcGIS Data Store。默认值为 Spatiotemporal 大数据存储。存储到时空大数据存储的所有结果都将存储在 WGS84 中。存储在关系数据存储中的结果将保留其坐标系。</para>
        ///   <bulletList>
        ///     <bullet_item>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>关系数据存储 - 输出将存储在关系数据存储中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Store")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_store_value _data_store { get; set; } = _data_store_value._SPATIOTEMPORAL_DATA_STORE;

        public enum _data_store_value
        {
            /// <summary>
            /// <para>Relational data store</para>
            /// <para>Relational data store—Output will be stored in your relational data store.</para>
            /// <para>关系数据存储 - 输出将存储在关系数据存储中。</para>
            /// </summary>
            [Description("Relational data store")]
            [GPEnumValue("RELATIONAL_DATA_STORE")]
            _RELATIONAL_DATA_STORE,

            /// <summary>
            /// <para>Spatiotemporal big data store</para>
            /// <para>Spatiotemporal big data store—Output will be stored in your spatiotemporal big data store. This is the default.</para>
            /// <para>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</para>
            /// </summary>
            [Description("Spatiotemporal big data store")]
            [GPEnumValue("SPATIOTEMPORAL_DATA_STORE")]
            _SPATIOTEMPORAL_DATA_STORE,

        }

        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output { get; set; }


        public CopyToDataStore SetEnv(object extent = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}